<!doctype html>



  


<html class="theme-next mist use-motion" lang="en">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="设计模式," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />






<meta name="description" content="23 Design PatternsCreational Patterns1.Abstract Factory:Creates an instance of several families of classes. Provide an interface for creating families of related or dependent objects without specifyin">
<meta name="keywords" content="设计模式">
<meta property="og:type" content="article">
<meta property="og:title" content="Design Patterns">
<meta property="og:url" content="http://yoursite.com/2015/04/25/Design-Patterns/index.html">
<meta property="og:site_name" content="Ji Xiang&#39;s blog">
<meta property="og:description" content="23 Design PatternsCreational Patterns1.Abstract Factory:Creates an instance of several families of classes. Provide an interface for creating families of related or dependent objects without specifyin">
<meta property="og:locale" content="en">
<meta property="og:updated_time" content="2018-11-18T02:59:33.027Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Design Patterns">
<meta name="twitter:description" content="23 Design PatternsCreational Patterns1.Abstract Factory:Creates an instance of several families of classes. Provide an interface for creating families of related or dependent objects without specifyin">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    sidebar: {"position":"left","display":"post"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: 'Author'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2015/04/25/Design-Patterns/"/>





  <title> Design Patterns | Ji Xiang's blog </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="en">

  










  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">Ji Xiang's blog</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
    
      <p class="site-subtitle">Walk step by step and learn everyday</p>
    
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            Archives
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            Tags
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://yoursite.com/2015/04/25/Design-Patterns/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="Ji Xiang">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="http://o7bp9e1ec.bkt.clouddn.com/1485173143816">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="Ji Xiang's blog">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="Ji Xiang's blog" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                Design Patterns
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">Posted on</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2015-04-25T11:11:55+08:00">
                2015-04-25
              </time>
            

            

            
          </span>

          

          
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="23-Design-Patterns"><a href="#23-Design-Patterns" class="headerlink" title="23 Design Patterns"></a>23 Design Patterns</h2><h3 id="Creational-Patterns"><a href="#Creational-Patterns" class="headerlink" title="Creational Patterns"></a>Creational Patterns</h3><h4 id="1-Abstract-Factory"><a href="#1-Abstract-Factory" class="headerlink" title="1.Abstract Factory:"></a>1.Abstract Factory:</h4><p>Creates an instance of several families of classes. Provide an interface for creating families of related or dependent objects without specifying their concrete classes.<br>提供一个接口，让该接口负责创建一系列相关或者相互依赖的对象，无需指定它们具体的类。</p>
<h4 id="2-Builder"><a href="#2-Builder" class="headerlink" title="2.Builder:"></a>2.Builder:</h4><p>Separates object construction from its representation. Separate the construction of a complex object from its representation so that the same construction processes can create different representations.<br>将一个复杂对象的构建与它的表示分离，使得同样的构建过程可以创建不同的表示。</p>
<h4 id="3-Factory-Method"><a href="#3-Factory-Method" class="headerlink" title="3.Factory Method:"></a>3.Factory Method:</h4><p>Creates an instance of several derived classes. Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.</p>
<h4 id="4-Prototype"><a href="#4-Prototype" class="headerlink" title="4.Prototype:"></a>4.Prototype:</h4><p>A fully initialized instance to be copied or cloned. Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.<br>通过复制（克隆、拷贝）一个指定类型的对象来创建更多同类型的对象。这个指定的对象可被称为“原型”对象，也就是通过复制原型对象来得到更多同类型的对象。</p>
<h4 id="5-Singleton"><a href="#5-Singleton" class="headerlink" title="5.Singleton:"></a>5.Singleton:</h4><p>A class of which only a single instance can exist. Ensure a class only has one instance, and provide a global point of access to it.</p>
<h3 id="Structural-Patterns"><a href="#Structural-Patterns" class="headerlink" title="Structural Patterns"></a>Structural Patterns</h3><h4 id="6-Adapter"><a href="#6-Adapter" class="headerlink" title="6.Adapter:"></a>6.Adapter:</h4><p>Match interfaces of different classes.Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces.<br>适配器模式（Adapter Pattern），把一个类的接口变换成客户端所期待的另一种接口，Adapter模式使原本因接口不匹配（或者不兼容）而无法在一起工作的两个类能够在一起工作。</p>
<h4 id="7-Bridge"><a href="#7-Bridge" class="headerlink" title="7.Bridge:"></a>7.Bridge:</h4><p>Separates an object’s interface from its implementation. Decouple an abstraction from its implementation so that the two can vary independently.<br>桥连模式：将抽象部分与实现部分分离，使它们都可以独立的变化。它是一种结构性模式，又称柄体（Handle and body）模式或者接口（Interface）模式。</p>
<h4 id="8-Composite"><a href="#8-Composite" class="headerlink" title="8.Composite:"></a>8.Composite:</h4><p>A tree structure of simple and composite objects. Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.</p>
<h4 id="9-Decorator"><a href="#9-Decorator" class="headerlink" title="9.Decorator:"></a>9.Decorator:</h4><p>Add responsibilities to objects dynamically.  Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.</p>
<h4 id="10-Facade"><a href="#10-Facade" class="headerlink" title="10.Facade:"></a>10.Facade:</h4><p>A single class that represents an entire subsystem. Provide a unified interface to a set of interfaces in a system. Facade defines a higher-level interface that makes the subsystem easier to use.<br>外观模式：为子系统中的一组接口提供一个一致的界面， Facade模式定义了一个高层接口，这个接口使得这一子系统更加容易使用。引入外观角色之后，用户只需要直接与外观角色交互，用户与子系统之间的复杂关系由外观角色来实现，从而降低了系统的耦合度。</p>
<h4 id="11-Flyweight"><a href="#11-Flyweight" class="headerlink" title="11.Flyweight:"></a>11.Flyweight:</h4><p>A fine-grained instance used for efficient sharing. Use sharing to support large numbers of fine-grained objects efficiently. A flyweight is a shared object that can be used in multiple contexts simultaneously. The flyweight acts as an independent object in each context — it’s indistinguishable from an instance of the object that’s not shared.<br>享元模式（Flyweight）：对象结构型模式运用共享技术有效地支持大量细粒度的对象。它使用共享物件，用来尽可能减少内存使用量以及分享资讯给尽可能多的相似物件；它适合用于当大量物件只是重复因而导致无法令人接受的使用大量内存。通常物件中的部分状态是可以分享。常见做法是把它们放在外部数据结构，当需要使用时再将它们传递给享元。</p>
<h4 id="12-Proxy"><a href="#12-Proxy" class="headerlink" title="12.Proxy:"></a>12.Proxy:</h4><p>An object representing another object. Provide a surrogate or placeholder for another object to control access to it.<br>代理模式:   为其他对象提供一种代理，并以控制对这个对象的访问。</p>
<h3 id="Behavioral-Patterns"><a href="#Behavioral-Patterns" class="headerlink" title="Behavioral Patterns"></a>Behavioral Patterns</h3><h4 id="13-Chain-of-Resp"><a href="#13-Chain-of-Resp" class="headerlink" title="13.Chain of Resp:"></a>13.Chain of Resp:</h4><p>A way of passing a request between a chain of objects. Avoid coupling the sender of a request to its receiver by giving more than one object a  chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it.<br>责任链模式是一种对象的行为模式。在责任链模式里，很多对象由每一个对象对其下家的引用而连接起来形成一条链。请求在这个链上传递，直到链上的某一个对象决定处理此请求。发出这个请求的客户端并不知道链上的哪一个对象最终处理这个请求，这使得系统可以在不影响客户端的情况下动态地重新组织链和分配责任。</p>
<h4 id="14-Command"><a href="#14-Command" class="headerlink" title="14.Command:"></a>14.Command:</h4><p>Encapsulate a command request as an object. Encapsulate a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations.<br>命令模式(Command Pattern)：将一个请求封装为一个对象，从而使我们可用不同的请求对客户进行参数化；对请求排队或者记录请求日志，以及支持可撤销的操作。命令模式又称为动作(Action)模式或事务(Transaction)模式。</p>
<h4 id="15-Interpreter"><a href="#15-Interpreter" class="headerlink" title="15.Interpreter:"></a>15.Interpreter:</h4><p>A way to include language elements in a program. Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.<br>Interpreter是一种特殊的设计模式，它建立一个解释器，对于特定的计算机程序设计语言，用来解释预先定义的文法。简单地说，Interpreter模式是一种简单的语法解释器构架。</p>
<h3 id="16-Iterator"><a href="#16-Iterator" class="headerlink" title="16.Iterator:"></a>16.Iterator:</h3><p>Sequentially access the elements of a collection. Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.<br>Iterator模式指对容器中包含的内部对象的访问委让给外部类，使用Iterator（遍历）按顺序进行遍历访问的设计模式。</p>
<h4 id="17-Mediator"><a href="#17-Mediator" class="headerlink" title="17.Mediator:"></a>17.Mediator:</h4><p>Defines simplified communication between classes. Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicitly, and it lets you vary their interaction independently.<br>Mediator模式也叫中介者模式，是由GoF提出的23种软件设计模式的一种。Mediator模式是行为模式之一，在Mediator模式中，类之间的交互行为被统一放在Mediator的对象中，对象通过Mediator对象同其他对象交互，Mediator对象起着控制器的作用。</p>
<h4 id="18-Memento"><a href="#18-Memento" class="headerlink" title="18.Memento:"></a>18.Memento:</h4><p>Capture and restore an object’s internal state. Without violating encapsulation, capture and externalize an object’s internal state so that the object can be restored to this state later.<br>memento是一个保存另外一个对象内部状态拷贝的对象.这样以后就可以将该对象恢复到原先保存的状态。</p>
<h4 id="19-Observer"><a href="#19-Observer" class="headerlink" title="19.Observer:"></a>19.Observer:</h4><p>A way of notifying change to a number of classes. Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.<br>观察者模式定义了一种一对多的依赖关系，让多个观察者对象同时监听某一个主题对象。这个主题对象在状态上发生变化时，会通知所有观察者对象，使它们能够自动更新自己。</p>
<h4 id="20-State"><a href="#20-State" class="headerlink" title="20.State:"></a>20.State:</h4><p>Alter an object’s behavior when its state changes. Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.<br>状态模式：允许一个对象在其内部状态改变时改变它的行为。对象看起来似乎修改了它的类。<br>在很多情况下，一个对象的行为取决于一个或多个动态变化的属性，这样的属性叫做状态，这样的对象叫做有状态的(stateful)对象，这样的对象状态是从事先定义好的一系列值中取出的。当一个这样的对象与外部事件产生互动时，其内部状态就会改变，从而使得系统的行为也随之发生变化。</p>
<h4 id="21-Strategy"><a href="#21-Strategy" class="headerlink" title="21.Strategy:"></a>21.Strategy:</h4><p>Encapsulates an algorithm inside a class. Define a family of algorithms, encapsulate each one, and make them interchangeable.Strategy lets the algorithm vary independently from clients that use it.<br>策略模式：定义一系列的算法,把每一个算法封装起来, 并且使它们可相互替换。本模式使得算法可独立于使用它的客户而变化。</p>
<h4 id="22-Template"><a href="#22-Template" class="headerlink" title="22.Template:"></a>22.Template:</h4><p>Defer the exact steps of an algorithm to a subclass. Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm’s structure.<br>在一个方法中定义一个算法的骨架，而将一些步骤延迟到子类中。模板方法使得子类可以在不改变算法结构的情况下，重新定义算法中的某些步骤。</p>
<h4 id="23-Visitor"><a href="#23-Visitor" class="headerlink" title="23.Visitor:"></a>23.Visitor:</h4><p>Defines a new operation to a class without change. Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates.<br>访问者模式的目的是封装一些施加于某种数据结构元素之上的操作。一旦这些操作需要修改的话，接受这个操作的数据结构则可以保持不变。</p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>


    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/设计模式/" rel="tag"># 设计模式</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2015/04/18/How-to-build-your-owner-blog-with-HEXO/" rel="next" title="How to build your owner blog with HEXO">
                <i class="fa fa-chevron-left"></i> How to build your owner blog with HEXO
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/03/14/course-note-1/" rel="prev" title="信息系统管理与安全(1)">
                信息系统管理与安全(1) <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>

          
          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            Overview
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="http://o7bp9e1ec.bkt.clouddn.com/1485173143816"
               alt="Ji Xiang" />
          <p class="site-author-name" itemprop="name">Ji Xiang</p>
          <p class="site-description motion-element" itemprop="description"></p>
        </div>
        <nav class="site-state motion-element">
        
          
            <div class="site-state-item site-state-posts">
              <a href="/archives">
                <span class="site-state-item-count">20</span>
                <span class="site-state-item-name">posts</span>
              </a>
            </div>
          

          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">14</span>
                <span class="site-state-item-name">tags</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
        </div>

        
        

        
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#23-Design-Patterns"><span class="nav-number">1.</span> <span class="nav-text">23 Design Patterns</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#Creational-Patterns"><span class="nav-number">1.1.</span> <span class="nav-text">Creational Patterns</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#1-Abstract-Factory"><span class="nav-number">1.1.1.</span> <span class="nav-text">1.Abstract Factory:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#2-Builder"><span class="nav-number">1.1.2.</span> <span class="nav-text">2.Builder:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#3-Factory-Method"><span class="nav-number">1.1.3.</span> <span class="nav-text">3.Factory Method:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#4-Prototype"><span class="nav-number">1.1.4.</span> <span class="nav-text">4.Prototype:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#5-Singleton"><span class="nav-number">1.1.5.</span> <span class="nav-text">5.Singleton:</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Structural-Patterns"><span class="nav-number">1.2.</span> <span class="nav-text">Structural Patterns</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#6-Adapter"><span class="nav-number">1.2.1.</span> <span class="nav-text">6.Adapter:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#7-Bridge"><span class="nav-number">1.2.2.</span> <span class="nav-text">7.Bridge:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#8-Composite"><span class="nav-number">1.2.3.</span> <span class="nav-text">8.Composite:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#9-Decorator"><span class="nav-number">1.2.4.</span> <span class="nav-text">9.Decorator:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#10-Facade"><span class="nav-number">1.2.5.</span> <span class="nav-text">10.Facade:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#11-Flyweight"><span class="nav-number">1.2.6.</span> <span class="nav-text">11.Flyweight:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#12-Proxy"><span class="nav-number">1.2.7.</span> <span class="nav-text">12.Proxy:</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Behavioral-Patterns"><span class="nav-number">1.3.</span> <span class="nav-text">Behavioral Patterns</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#13-Chain-of-Resp"><span class="nav-number">1.3.1.</span> <span class="nav-text">13.Chain of Resp:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#14-Command"><span class="nav-number">1.3.2.</span> <span class="nav-text">14.Command:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#15-Interpreter"><span class="nav-number">1.3.3.</span> <span class="nav-text">15.Interpreter:</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#16-Iterator"><span class="nav-number">1.4.</span> <span class="nav-text">16.Iterator:</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#17-Mediator"><span class="nav-number">1.4.1.</span> <span class="nav-text">17.Mediator:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#18-Memento"><span class="nav-number">1.4.2.</span> <span class="nav-text">18.Memento:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#19-Observer"><span class="nav-number">1.4.3.</span> <span class="nav-text">19.Observer:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#20-State"><span class="nav-number">1.4.4.</span> <span class="nav-text">20.State:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#21-Strategy"><span class="nav-number">1.4.5.</span> <span class="nav-text">21.Strategy:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#22-Template"><span class="nav-number">1.4.6.</span> <span class="nav-text">22.Template:</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#23-Visitor"><span class="nav-number">1.4.7.</span> <span class="nav-text">23.Visitor:</span></a></li></ol></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Ji Xiang</span>
</div>


<div class="powered-by">
  Powered by <a class="theme-link" href="https://hexo.io">Hexo</a>
</div>

<div class="theme-info">
  Theme -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Mist
  </a>
</div>


        

        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  




  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  



  




	





  





  

  
      <!-- UY BEGIN -->
      <script type="text/javascript" src="http://v2.uyan.cc/code/uyan.js?uid="></script>
      <!-- UY END -->
  




  
  

  

  

  

  


</body>
</html>
